package cn.zhizihua.mapper;

import cn.zhizihua.pojo.User;
import cn.zhizihua.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User>{

    int add(User user);
    int update(User user);
    int delete(Integer id);
    User getById(Integer id);
    List<User> getAll();
    //通过用户名查询用户
    @Select("select * from user where username=#{username}")
    User getByUserName(String userName);
}
